/***************************************************************************\
 * Copyright (C) by Keio University
 * Sensor.hpp created in 07 2012.
 * Mail : fdesorbi@hvrl.ics.keio.ac.jp
 *
 * sensor.hpp is part of HVRL Engine Library.
 *
 * The HVRL Engine Library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * The HVRL Engine Library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 \***************************************************************************/

#ifndef HVRL_SENSOR_HPP__
#define HVRL_SENSOR_HPP__

#if defined(_WIN32) || defined(__CYGWIN__)
#include <windows.h>
#endif

#include "hvrl/common/Common.hpp"

#include "hvrl/datatypes/RGBDImage.hpp"
#include "hvrl/datatypes/PointCloud.hpp"

#include <boost/signals2.hpp>

namespace hvrl{

class Sensor{

public:

	virtual ~Sensor(void) {}

	virtual std::string getName(void) const = 0;

	virtual unsigned int getID(void) const = 0;

	virtual RGBDImage* getImage(void) = 0;

	virtual bool getValuef(const std::string& name, float& value) = 0;

	virtual bool isRunning(void) const = 0;

	virtual Size getResolution(void) const = 0;

	virtual PointCloud* getPointCloud(void) = 0;

	virtual boost::signals2::signal<void ()>& getUpdatedSignal(void) = 0;

	virtual boost::signals2::signal<void ()>& getReadySignal(void) = 0;

public:

	virtual void pause(void) = 0;

	virtual void play(void) = 0;

	virtual void stop(void) = 0;

protected:

	void updated(void);

	void ready(void);

};

}


#endif
